﻿<?
	/*
	 * 问答系统首页
	 * 
	 * author:	天
	 * 
	 * date:	2009-2-25
	 */
?>


<html>
<head>
	<title>首页－－问答系统</title>
	<meta http-equiv="Content-Type" content="text/xml; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="CodeIgniter/web.css" />
</head>


<body>
	热点问题
	<table border=1>
		<tr>
			<td>问题</td>
			<td width="80"><center>类型</center></td>
			<td width="150"><center>提问时间</center></td>
			<td>回答</td>
			<td>悬赏</td>
		</tr>
		
	  	<tr>
		    <? 	$i=1;
		    	foreach($list as $row):
		    	if($row->views >= '15'&&$i<=5)
		    	{
		    		$i++;
		    ?>
					<td><a href="/CodeIgniter/questions/<?=$row->qid ?>"><?=$row->title ?></a></td>
					<td><center><a href="/CodeIgniter/questions/ctags/<?=$row->cid ?>"><?=$row->name ?></a></center></td>
					<td><center><?=$row->postdate ?></center></td>
					<td><center><?=$row->answercount ?></center></td>
					<td><center><?=$row->price ?></center></td>
		</tr>
			<? 
		    	}
				endforeach; 
			?>
	</table>
	<br><br>
	
	待解决问题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/CodeIgniter/questions/active">更多</a>
	<table border=1>
		<tr>
			<td>问题</td>
			<td width="80"><center>类型</center></td>
			<td width="150"><center>提问时间</center></td>
			<td>回答</td>
			<td>悬赏</td>
		</tr>
		
	  	<tr>
		    <? 	$i=1;
		    	foreach($list as $row):
		    	if($row->active == 1 &&$i<=5)
		    	{
		    		$i++;
		    ?>
					<td><a href="/CodeIgniter/questions/<?=$row->qid ?>"><?=$row->title ?></a></td>
					<td><center><a href="/CodeIgniter/questions/ctags/<?=$row->cid ?>"><?=$row->name ?></a></center></td>
					<td><center><?=$row->postdate ?></center></td>
					<td><center><?=$row->answercount ?></center></td>
					<td><center><?=$row->price ?></center></td>
		</tr>
			<? 
		    	}
				endforeach; 
			?>
	</table>
	<br><br>
	
	已解决问题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/CodeIgniter/questions/solved">更多</a>
	<table border=1>
		<tr>
			<td>问题</td>
			<td width="80"><center>类型</center></td>
			<td width="150"><center>提问时间</center></td>
			<td>回答</td>
			<td>悬赏</td>
		</tr>
		
	  	<tr>
		    <? 	$i=1;
		    	foreach($list as $row):
		    	if($row->solved == 1 &&$i<=5)
		    	{
		    		$i++;
		    ?>
					<td><a href="/CodeIgniter/questions/<?=$row->qid ?>"><?=$row->title ?></a></td>
					<td><center><a href="/CodeIgniter/questions/ctags/<?=$row->cid ?>"><?=$row->name ?></a></center></td>
					<td><center><?=$row->postdate ?></center></td>
					<td><center><?=$row->answercount ?></center></td>
					<td><center><?=$row->price ?></center></td>
		</tr>
			<? 
		    	}
				endforeach;
			?>
	</table>
		
</body>
</html>